import React from "react";
import styles from "./style.module.scss";
import { Button } from "antd";
import { LeftCircleOutlined } from "@ant-design/icons"; 

export const Mobile = ({ children, showBack, onBack }: any) => {
    return (<section className={styles.mobile}>
        <header>
            <h3>学校任务数据收集</h3>
            { showBack && <Button onClick={onBack} type="text"><LeftCircleOutlined /></Button> }
        </header>
        <div>
            {children}
            <footer className={styles.mobileCopyRight}>
                <p>© 2024 Elmer S J Mo, all rights reserved.</p>
            </footer>
        </div>
    </section>);
};